<%-- $RCSFile: DownloadExplorer.aspx $
 Apache license v2 2011 by Christian Surieux
 $Source: ?/AddonNice.ECommerce/PageModules/Download/DownloadExplorer.aspx $
 $log$
 Revision 8 2010/08/09 11:08:11  christian.surieux
   Added Log comment to all .ascx .aspx .master files
 --%>
<%@ Page Language="C#" AutoEventWireup="false" Inherits="AddonNice.PageModules.Download.DownloadExplorer" Codebehind="DownloadExplorer.aspx.cs" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
	<title>Chose a package</title>
	<style type="text/css">
		body
		{
			margin: 2px;
		}
	</style>
</head>
<body>
	<form id="form1" runat="server">
	<telerik:RadStyleSheetManager ID="RadStyleSheetManager1" runat="server">
    </telerik:RadStyleSheetManager>
    <telerik:RadScriptManager ID="ScriptManager1" runat="server" EnableTheming="True">
	    <Scripts>
		    <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
		    <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
	    </Scripts>
    </telerik:RadScriptManager>

	<script type="text/javascript">
		//A function that will return a reference to the parent radWindow in case the page is loaded in a RadWindow object
		function getRadWindow()
		{
			var oWindow = null;
			if (window.radWindow) oWindow = window.radWindow;
			else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;
			return oWindow;
		}
		function OnClientGridDblClick(sender, args)
		{
			var item = args.get_item();
			if (item.get_type() == Telerik.Web.UI.FileExplorerItemType.File)
			{
				args.set_cancel(true);
				var wnd = getRadWindow();
				var openerPage = wnd.BrowserWindow;
				openerPage.OnFileSelected(wnd, item.get_path());
				wnd.close();
			}
		}
	</script>

	<telerik:RadFileExplorer runat="server" ID="FileExplorer1" Width="500px" 
        OnClientFileOpen="OnClientGridDblClick" Height="500px">
        <Configuration SearchPatterns="*.*" MaxUploadFileSize="1589934592"></Configuration>
	</telerik:RadFileExplorer>
	</form>
</body>
</html>
